package com.dykj.fireFighting.api.base.devHisResult.service;


import com.dykj.fireFighting.api.base.analysis.dto.ComprehensiveQueryDto;
import com.dykj.fireFighting.api.base.analysis.dto.QueryAnalysisDto;
import com.dykj.fireFighting.api.base.analysis.entity.FireAlarmAnalysisResult;
import com.dykj.fireFighting.api.base.analysis.entity.WarningRecovery;
import com.dykj.fireFighting.api.base.analysis.vo.ComprehensiveResultFLVo;
import com.dykj.fireFighting.api.base.dev.entity.vo.FaultVo;
import com.dykj.fireFighting.api.base.devHisResult.entity.DevHisResult;
import com.dykj.fireFighting.api.base.devHisResult.entity.InstructionRecord;
import com.dykj.fireFighting.api.base.devHisResult.entity.TongBiBean;
import com.dykj.fireFighting.api.base.devHisResult.vo.ResultVo;
import com.dykj.fireFighting.common.core.service.IBaseService;
import com.dykj.fireFighting.common.core.vo.PageVo;

import java.text.ParseException;
import java.util.Date;
import java.util.List;
import java.util.Map;

/**
 * 数据统计
 *
 * @Author LIJIANJIE
 * @Date  2021-09-22 10:24:54
 */
public interface IDevHisResultService extends IBaseService<DevHisResult> {

    /**
     * 查询社会单位统计数量
     * @param unitId 单位id
     * @param beginTime 开始时间
     * @param endTime 结束时间
     * @return
     */
    DevHisResult getUnitNum(String unitId, String beginTime, String endTime);

    /**
     * 查询监控中心统计数量
     * @param ids 单位ids
     * @param beginTime 开始时间
     * @param endTime 结束时间
     * @return
     */
    DevHisResult getCenterNum(List<String> ids, String beginTime, String endTime);

    /**
     * 根据单位id和日期查询
     * @param date 日期
     * @param unitId 单位id
     * @return
     */
    DevHisResult getByTime(String date, String unitId);

    /**
     * 监控中心下社会单位故障数排名列表
     * @param ids
     * @param beginTime
     * @param endTime
     * @return
     */
    List<FaultVo> getFaultList(List<String> ids, String beginTime, String endTime);

    int saveOne(Integer type, String unitId, String date);

    List<DevHisResult> getByUnitId(String unitId, String centerUnitId);


    int updateByUnitId(InstructionRecord instructionRecord);

    List<TongBiBean> getTongBiByMonth(String type, String newTime, String oldTime, Long enterpriseId,String socialUnitId);


    PageVo<WarningRecovery> getList(QueryAnalysisDto queryAnalysis);

    List<WarningRecovery> getChartDate(QueryAnalysisDto queryAnalysis);

    FireAlarmAnalysisResult getFireNum(QueryAnalysisDto queryAnalysis);


    List<FireAlarmAnalysisResult> getFireChartData(QueryAnalysisDto queryAnalysis);

    List<FireAlarmAnalysisResult> getFaultChartData(QueryAnalysisDto queryAnalysis);

    PageVo<FireAlarmAnalysisResult> getFaultDangerList(QueryAnalysisDto queryAnalysis);

    List<FireAlarmAnalysisResult> getFaultRankingList(QueryAnalysisDto queryAnalysis);


    List<ResultVo> getUnitDate(String centerId, String unitId, String beginTime, String endTime);

    List<ResultVo> getMonthDate(String unitId, String beginTime, String endTime);

    List<ResultVo> getQuarterDate(String unitId, String beginTime, String endTime);

    List<ResultVo> getYearDate(String unitId, String beginTime, String endTime);

    List<ComprehensiveResultFLVo> getFuHeLvQSByUnits(ComprehensiveQueryDto queryDto);

    List<ComprehensiveResultFLVo> getFuHeLvQSByArea(ComprehensiveQueryDto queryDto);

    List<ComprehensiveResultFLVo> getFuHeLvQSByIndustry(ComprehensiveQueryDto queryDto);

    List<ComprehensiveResultFLVo> getFuHeLvPHByUnits(ComprehensiveQueryDto queryDto);

    List<ComprehensiveResultFLVo> getFuHeLvPHByArea(ComprehensiveQueryDto queryDto);

    List<ComprehensiveResultFLVo> getFuHeLvPHByIndustry(ComprehensiveQueryDto queryDto);

    List<ComprehensiveResultFLVo> getChuZhiLvQSByUnits(ComprehensiveQueryDto queryDto);

    List<ComprehensiveResultFLVo> getChuZhiLvQSByArea(ComprehensiveQueryDto queryDto);

    List<ComprehensiveResultFLVo> getChuZhiLvQSByIndustry(ComprehensiveQueryDto queryDto);

    List<ComprehensiveResultFLVo> getChuZhiLvPHByUnits(ComprehensiveQueryDto queryDto);

    List<ComprehensiveResultFLVo> getChuZhiLvPHByArea(ComprehensiveQueryDto queryDto);

    List<ComprehensiveResultFLVo> getChuZhiLvPHByIndustry(ComprehensiveQueryDto queryDto);


    List<ComprehensiveResultFLVo> buling(ComprehensiveQueryDto queryDto, List<String> resDateNameList) throws ParseException;
}

